<?php get_header(); ?>

<?php if ( get_option('inreview_quote') == 'on' ) { ?>
	<div id="quote">
		<p id="tagline-quote">"<?php echo get_option('inreview_quote_text'); ?>"</p>
	</div> <!-- end #quote -->
<?php } ?>

<?php if ( is_home() && get_option('inreview_featured') == 'on' ) include(TEMPLATEPATH . '/includes/featured.php'); ?>

<div id="main-content">
	<div id="main-content-wrap" class="clearfix">
		<div id="left-area">
            <!--Begin Free Themes-->
            <div class="slide-home" style="">
                <?php include_once(TEMPLATEPATH . '/home-slide.php'); ?>
            </div>
            <div class="top-widgettitle" style="margin-bottom: 18px; border-bottom: 2px solid rgb(187, 187, 187);padding: 10px 0 5px 0">
                <h4 class="widgettitle" style="border-bottom: medium none;margin: 0px;display: inline;"><?php _e('Free Themes', 'InReview'); ?></h4>
                <div style="float: right;">
                    <a href="/themes/" style="text-decoration: none !important;">More Themes</a>
                </div>
            </div>
            <?php
            $args3 = array('post_type' => 'post', 'posts_per_page' => 12);
            $i = 0;
            if (get_option('inreview_duplicate') == 'false') $args3['post__not_in'] = $ids;
            $wpost3 = query_posts($args3);
            $total = count($wpost3);
            ?>
            <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
            <?php include(TEMPLATEPATH . '/includes/home-themes.php'); ?>
            <?php endwhile; endif; ?>
            <!--End End Themes-->
            <div class="clear"></div>
            <a href="/themes/" class="view-more view-more-themes" >
                <span class="get-more"><?php echo $total;?> more themes</span>
            </a>
            <div class="clear"></div>
            <!--Begin Wallpapers-->
            <div class="top-widgettitle" style="margin-bottom: 18px; border-bottom: 2px solid rgb(187, 187, 187);padding: 10px 0 5px 0">
                <h4 class="widgettitle" style="border-bottom: medium none;margin: 0px;display: inline;"><?php _e('Free Wallpapers', 'InReview'); ?></h4>
                <div style="float: right;">
                    <a href="/wallpapers/" style="text-decoration: none !important;">More Wallpapers</a>
                </div>
            </div>
			<?php
				$args = array('post_type' => 'wallpapers', 'posts_per_page' => 12);
				$i = 0;
				if (get_option('inreview_duplicate') == 'false') $args['post__not_in'] = $ids;
				$wpost = query_posts($args);
				$total = count($wpost);
			?>
			<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
				<?php include(TEMPLATEPATH . '/includes/home-wallpapers.php'); ?>
			<?php endwhile; ?>
			<!--End Wallpapers-->
            <div class="clear"></div>
            <a href="/wallpapers/" class="view-more view-more-themes" >
                <span class="get-more"><?php echo $total;?> more themes</span>
            </a>
            <div class="clear"></div>
            <!--Begin Ringtones-->
            <div class="top-widgettitle" style="margin-bottom: 18px; border-bottom: 2px solid rgb(187, 187, 187);padding: 10px 0 5px 0">
                <h4 class="widgettitle" style="border-bottom: medium none;margin: 0px;display: inline;"><?php _e('Free Ringtones', 'InReview'); ?></h4>
                <div style="float: right;">
                    <a href="/ringtones/" style="text-decoration: none !important;">More Ringtones</a>
                </div>
            </div>
			<?php
				$args2 = array('post_type' => 'ringtones', 'posts_per_page' => 12);
				$i = 0;
				if (get_option('inreview_duplicate') == 'false') $args2['post__not_in'] = $ids;
				$wpost2 = query_posts($args2);
				$total = count($wpost2);
			?>
            <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
                <?php include(TEMPLATEPATH . '/includes/home-ringtones.php'); ?>
                <?php endwhile; endif; ?>
            <!--End Ringtones-->
            <a href="/ringtones/" class="view-more view-more-themes" >
                <span class="get-more"><?php echo $total;?> more themes</span>
            </a>
            <div class="clear"></div>
			<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); }
				else { ?>
					 <?php include(TEMPLATEPATH . '/includes/navigation.php'); ?>
				<?php } ?>
			<?php else : ?>
				<?php include(TEMPLATEPATH . '/includes/no-results.php'); ?>
			<?php endif; wp_reset_query(); ?>
		</div> <!-- end #left-area -->
		
		<?php get_sidebar(); ?>
	</div> <!-- end #main-content-wrap -->
</div> <!-- end #main-content -->
<?php get_footer(); ?>